package sip

import (
	"fmt"
)

// Via ...
// Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKkjshdyff
// RFC 3261, 8.1.1.7
type Via struct {
	SIPVersion string
	Transport  string
	Host       string
	Branch     string
}

// String ...
func (v *Via) String() string {
	return fmt.Sprintf(
		"%s/%s %s;branch=%s",
		v.SIPVersion,
		v.Transport,
		v.Host,
		v.Branch,
	)
}
